// import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
// import emitter from './utils/emitter'

import App from './App.vue'
import router from './router' //省略index

//创建应用对象
const app = createApp(App)

// 挂载全局属性，类似挂载到原型链上
app.config.globalProperties.lxy = 'lxy'
//参数名必须为value
app.directive('beauty',(element,{value})=>{
    element.innerText += value,
    element.style.color = 'red',
    element.style.background = 'blue'
})
app.use(router)
app.use(createPinia())

app.mount('#app')

//卸载
setTimeout(()=>{
    app.unmount();
},3000)
